//
//  LJLRecommandRadioCVC.m
//  聆听FM
//
//  Created by dllo on 16/6/7.
//  Copyright © 2016年 Dark. All rights reserved.
//

#import "LJLRecommandRadioCVC.h"

@implementation LJLRecommandRadioCVC

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.picIV = [[UIImageView alloc] init];
        [self.contentView addSubview:_picIV];
        self.titleL = [[UILabel alloc] init];
        self.titleL.textColor = [UIColor whiteColor];
        self.titleL.textAlignment = 0;
        self.titleL.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:_titleL];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.picIV.frame = CGRectMake(0, 0, (SCREENWIDTH - 40) / 3.0, (SCREENWIDTH - 40) / 3.0);
    self.titleL.frame = CGRectMake(0, (SCREENWIDTH - 40) / 3.0, (SCREENWIDTH - 40) / 3.0 + 10, 150 - (SCREENWIDTH - 30) / 3.0);
}
- (void)setModel:(LJLRadioPageModel *)model
{
    if (_model != model) {
        _model = model;
        
        [self.picIV sd_setImageWithURL:[NSURL URLWithString:model.radioCoverLarge] placeholderImage:[UIImage sd_animatedGIFNamed:@"占位图"]];
        self.titleL.text = model.rname;
    }
}

@end
